# Contributor: Noel Kuntze <noel.kuntze@thermi.consulting>
# Maintainer: Noel Kuntze <noel.kuntze@thermi.consulting>
pkgname=py3-requests-gssapi
pkgver=1.3.0
pkgrel=1
pkgdesc="GSSAPI (HTTP negotiate) authentication handler for Python Requests"
url="https://github.com/pythongssapi/requests-gssapi"
arch="noarch"
license="ISC"
depends="
	python3
	py3-python-gssapi
	py3-requests
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver-2.tar.gz::https://github.com/pythongssapi/requests-gssapi/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/requests-gssapi-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
d4ce6e132d19f0bb1fa388d3e6700acd201f6b63b5352e93d833f470f8a7812aff416a4360dd44dc8eaebd019fed7e5d3c39c8641b820874ff0cbbee77ae5ba5  py3-requests-gssapi-1.3.0-2.tar.gz
"
